This invention relates generally to methods for correcting for marking engine characteristics, and more particularly, to a method of smooth trapping suppression of small and thin graphical objects using color interpolation.
Electronic processing of graphic and text images produces multi-color prints using multiple color separations. Typically, four process colors, cyan, magenta, yellow and black, are used to print multiple separations, which tend to have minor misregistration problems. The result of abutting or overlapping shapes is a boundary between adjacent regions of color that, under ideal printing conditions should have zero width. That is, one color should stop exactly where the abutting color begins, with no new colors being introduced along the boundary by the printing process itself. In practice, the realization of a zero width boundary between regions of different color is impossible as a result of small but visible misregistration problems from one printed separation to another. The error is manifested as a “light leak” or as a visible boundary region of an undesired color.
Methods for correcting for this misregistration are known. The general approach is to expand one of the abutting regions' separations to fill the gap or misregistration border region with a color determined to minimize the visual effect when printed. Borders or edges expanded from a region of one color to another in this manner are said to be “spread”. A border that has been expanded is referred to as a “trap”, and the zone within which color is added is called the “trap zone”.
Trapping is generally a two-step process. The first step in the trapping process is to determine where there is an edge on which to apply trapping. Trapping is typically used between pixels that are not of identical color, but it can be used in other locations as well. The second step is to generate the overlay of one or more pixels, in any combination of the color separations, which is done by a trap generator or “trap oracle”. The two inputs for the trap generator are the colors on both sides of the edge in question. For example, consider magenta and cyan, with a user-specified maximum trap width of two. The generator will compute from these whether trapping is necessary, what color to use, and where it should be applied. In this example, the correction could be zero (no trapping), one, or two pixels in width in any combination of cyan, magenta, yellow and black, and it could be located in either the magenta or cyan area. Edge detection and image manipulation to perform trapping may be done in any of several processes, including for example, the technique described in U.S. Pat. No. 6,345,117 to Victor Klassen, for “Method for Automatic Trap Selection for Correcting for Separation Misregistration in Color Printing”.
For the typical trapping operation, it is assumed that objects to be trapped are very large relative to the trapping region, so that the trap colors will be difficult to distinguish. Thus, the color of only a thin boundary of the object will be changed, while the large internal area will have the original, correct color. However, for objects smaller than a few pixels, or for long, thin objects having a width less than a few pixels, trapping results in visible hue changes in the color of the entire object. For example, if a thin line is only two pixels in width, and the trap generator decides to change the color of those two pixels, the entire color of the thin line has been changed. Small objects, such as small font size text characters, may be printed in an entirely different color. If the thin line, or the small object, happens to be located near a larger object of the same initial color, there will be a visible hue shift relative to the larger object, and the result of the trapping operation will be less desirable than no trapping at all. Existing trapping algorithms (for example Scitex) specify an object or font size threshold below which trapping is disabled. This has the effect of eliminating the hue shift, but misregistration errors become visible once again. Also, previous work by McElvain (D/A3049) describes methods for minimizing the hue shift by reducing the trap radius for small objects. Although implementation of this method is straightforward, visible trap radius nonuniformities can still appear, particularly for small fonts with edges of high curvature.
Disclosed in one embodiment herein is a method for smooth trapping of a small graphical object, which includes receiving from a trap generator the location of a trap pixel in a thin object and the required trap; determining the width of the thin object; comparing the width of the thin object with a predetermined trap threshold width; if the width of the thin object is less than the trap threshold width, adjusting the hue of the trap pixel according to a predetermined relationship; and applying a trap correction to the trap pixel according to the adjusted trap hue. The adjusted trap hue may be determined by interpolating between the original trap color specified by the trap generator and the original object color. This process is repeated for each trap pixel selected by the trap generator. In the case of a thin object, the trap generator would continue selecting trap pixels along the long edge of the thin object until all trapping had been completed.
In accordance with another embodiment of the method, the predetermined relationship may be of the form t′α=ƒα(wt, w)·tα+{1−ƒα(wt, w)}·cα, where tαand t′αare the original and adjusted trap colors for a separation α, cαis the original object color, w and wt are the object dimension and threshold, and ƒα(wt, w) is a weight function (dependent on the object width) that dictates the percentage of the original trap color that is to be used. The weight function may be monotonically increasing, wherein ƒα(wt, w)=(w/wt), for w<wt, and ƒα(wt, w)=1 for w>wt.
In accordance with another embodiment, a method for smooth trapping of a small object, includes receiving from a trap generator the location of a trap pixel at an edge of the small object and the required trap color; wherein a small object has a size of the order of a few pixels; determining a dimension of the small object; comparing the dimension of the small object with a trap threshold width; if the dimension of the object is less than the trap threshold width, for each trap pixel along the edge of the small object, adjusting the hue of the trap pixel according to a predetermined relationship; and applying a trap correction uniformly to the small object according to the adjusted trap hue.
The method may be used for smooth trapping of a text object, and may include receiving from a trap generator the location of a trap pixel in the text object that should be changed in color; wherein a text object has a font size; determining the font size of the text object containing the trap pixel; comparing the font size of the object with a trap threshold width; if the font size of the object is less than the trap threshold width adjusting the hue of the trap pixel according to a predetermined relationship; if the dimension of the object is less than the trap threshold width, for each trap pixel along the edge of the small object, adjusting the hue of the trap pixel according to a predetermined relationship; and applying a trap color correction to the trap pixel according to the adjusted trap hue.
In accordance with another embodiment, a method for smooth trapping of a thin object, can also be extended to apply to “centerline” traps, which occur when the trap engine specifies the trap should encroach into both abutting colors: color A (CA) and color B (CB). A centerline trap occurs when the trap pixel is partially in the color A region and partially in the color B region. In this case, the color interpolation would be applied independently to each portion of the trap pixel—one interpolation involving CA and the thickness of the thin object, and another involving CB and the thickness of the first thin object. In this case, trapping will occur on both sides of the boundary with the method being applied to the different original colors on each side of the boundary. A method for smooth trapping of a thin object, includes receiving from a trap generator the location of a trap pixel in a thin object and the required trap color; determining if the trap pixel is located at the interface between a first color and a second abutting color such that a portion of the trap pixel is located in the first color region and another portion of the trap pixel is located in the second color region; determining the width of the thin object; comparing the width of the thin object with a predetermined trap threshold width; if the width of the thin object is less than the predetermined trap threshold width, adjusting the hue of the portion of the trap pixel residing in the first color region according to a first predetermined relationship, and adjusting the hue of the portion of the trap pixel residing in the second color region according to a second predetermined relationship, and applying a trap correction to the portion of the trap pixel residing in the first color region according to the adjusted trap hue for the first color, and; applying a trap correction to the portion of the trap pixel residing in the second color region according to the adjusted trap hue for the second color.
Instead of completely eliminating trapping for dimensions below the threshold, or reducing the trap radius in a monotonic fashion, the proposed methods interpolate between the trap color (specified by the trapping “engine” or generator) and the original object color. The degree of this interpolation is dependent on the local (or global) size of the object relative to the size threshold. For objects with dimensions above the threshold, the trap color would be that specified by the trap engine; for objects with very small dimensions relative to the threshold, the trap color applied would be very close to the original color of the object. Hence any hue and brightness shifts observed for trapped small objects would be significantly reduced, while preserving some of the benefits of trapping.